package 设计模式.行为型模式.观察者模式;

/**
 * @author MT
 * @date 2019-11-13 18:41
 */
public class 观察者模式 {

    public static void main(String[] args) {

        Subject subject = new ConcreteSubject();
        Observer obs1 = new ConcreteObserver1();
        Observer obs2 = new ConcreteObserver2();
        subject.add(obs1);
        subject.add(obs2);
        subject.notifyObserver();
    }
}
